Thread: Error expected '=', ',' ,'asm', 'or' before token '{'

  1. #1
    Registered User
    Join Date
    Oct 2012
    Posts
    158

    Error expected '=', ',' ,'asm', 'or' before token '{'

    Why do i keep this error?

    int main()
    {

    It happens on the same line as {


    It wouldn't make sense to put a =, or, ; right after main right?

  2. #2
    Registered User camel-man's Avatar
    Join Date
    Jan 2011
    Location
    Under the moon
    Posts
    693
    Post your entire code.

  3. #3
    Registered User
    Join Date
    Oct 2012
    Posts
    158
    I think i figured it out haha.

    I had int main

    and then i had a function below it. I included the other function within my main function without closing my main function first.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 01-10-2012, 02:13 PM
  2. Error: expected identifier or ‘(’ before ‘{’ token
    By jpcanaverde in forum C Programming
    Replies: 66
    Last Post: 06-08-2010, 12:53 PM
  3. error: expected unqualified-id before '{' token
    By fhbwghads in forum C++ Programming
    Replies: 5
    Last Post: 12-25-2008, 04:39 AM
  4. error: expected unqualified-id before '=' token
    By (::) in forum C++ Programming
    Replies: 2
    Last Post: 05-16-2008, 11:50 PM
  5. error: expected ‘;’ before ‘:’ token
    By kris.c in forum C Programming
    Replies: 5
    Last Post: 02-10-2008, 10:26 PM